{include file="public/header"}
<body>
<style>
    .layui-form-label{
        width: 200px;
    }
    .layui-input{
        width:70%;
    }
</style>

<form class="layui-form" >
    <div class="layui-form-item">
        <label class="layui-form-label"> APPID </label>
        <div class="layui-input-block">
            <input type="text" name="appid"  class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"> APPSECRET</label>
        <div class="layui-input-block">
            <input type="text" name="appsecret"  class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"> 接口URL</label>
        <div class="layui-input-block">
            <input type="text" name="requestUrl"    class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"> TOKEN</label>
        <div class="layui-input-block">
            <input type="text" name="token"    class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"> 接口检测</label>
        <div class="layui-input-block">
            <input type="text"  value=""   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"> </label>
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="admin-form">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>


{include file="public/footer"}

<script>

    layui.use('form', function(){
        var form = layui.form();
        form.on('submit(admin-form)', function(data){
            var params  = {
                url: '{:url("add")}',
                data: data.field,
                type: 'post',
                sCallback:function(res){
                    layer.msg(res.msg,{time:1800},function(){
                        location.reload();
                    });
                }
            };
            common.request(params);
            return false;
        });

    });
</script>

</body>
</html>